package com.ccx.coachsite.http;

public class UrlConfig 
{
	public static final String PrivateTestUrl = "http://218.6.70.2:8888/3g_group/";
	public static final String TestUrl = "http://218.5.99.35:8082/wap/icitySDK/";
	//public static final String EncUrl = "http://218.6.70.2:8888/3g_group/3g/";
	//public static final String ImageBaseUrl = "http://218.6.70.2:8888/3g_group";

	public static final String EncUrl = "http://www.yyzl.me/3g/";  //"http://117.27.144.30/3g/";  
	public static final String ImageBaseUrl = "http://www.yyzl.me";    //"http://117.27.144.30";    
		
	
	public static final Boolean isTest = false;
	public static final Boolean TestVersion = false;
	public static final String PageString = "&pageNumber=1&pageSize=10000";
	
	public static final int LoginUrlKey 			= 1;
	public static final int RegisterUrlKey 			= 2;
	public static final int GetVerifyUrlKey 		= 3;
	public static final int RepasswordUrlKey 		= 4;
	public static final int GetMyExpertUrlKey       = 5;
	public static final int GetTutorialUrlKey       = 200;
	public static final int GetTutorialDetailUrlKey = 201;
	public static final int SearchTutorialUrlKey    = 202;
	public static final int GetExpertListUrlKey     = 300;
	public static final int GetExpertMessageUrlKey  = 301;
	public static final int SendMessageUrlKey       = 302;
	public static final int RandomExpertUrlKey      = 303;
	public static final int AssignExpertUrlKey      = 304;
	public static final int TutorialCollectFavour   = 305;
	public static final int GetNoReadMessage        = 306;
	public static final int SuggestUrlKey	        = 7;
	public static final int ScoreUrlKey		        = 8;
	public static final int VipScoreUrlKey		    = 9;
	public static final int OwerInfoUrlKey		    = 10;
	public static final int ExpertInfoUrlKey	    = 11;
	public static final int OwerFriendUrlKey	    = 12;
	public static final int OwerCollectUrlKey	    = 13;
	public static final int OwerShareUrlKey	        = 14;
	public static final int OwerMessageUrlKey 	    = 15;
	public static final int OwerMessageDetailUrlKey = 16;
	public static final int OwerFriendDetailUrlKey	= 17;
	public static final int OwerAddFriendLogUrlKey	= 18;
	public static final int ManageSalaryUrlKey		= 19;
	public static final int ManageGroupsUrlKey      = 20;
	public static final int ManageQeurySalaryUrlKey	= 21;
	public static final int ManageManageInfoUrlKey	= 22;
	public static final int ManageCustomInfoUrlKey	= 23;
	public static final int ManageAnalysisInfoUrlKey	= 24;
	public static final int ManageAddGroupUrlKey    = 30;
	public static final int ManageRemoveGroupUrlKey = 31;
	public static final int ManageGetClientsUrlKey  = 32;
	public static final int ManageAddClientsToGroupUrlKey = 33;
	public static final int ManageAddCustomUrlKey	= 34;
	public static final int ManageMoveClients       = 35;
	public static final int ManageRemoveClients     = 36;
	public static final int OwerDeleteMessageUrlKey	= 25;
	public static final int OwerDeleteCollectUrlKey	= 50;
	public static final int ReinfoUrlKey 			= 51;
	public static final int InviteUrlKey 			= 52;
	public static final int ManageQueryCustomUrl	= 53;
	public static final int ManageCheckCustomUrlKey	= 54;
	public static final int ManageSendMessageUrlKey	= 55;
	public static final int ManageQueryContactUrlKey	= 56;
	public static final int OwerForgetPasswordUrl	= 57;
	public static final int RegisterSina            = 500;
	public static final int RegisterQQ              = 501;
	public static final int LiginStaticKey          = 502;
	
	public static final int QQLoginUrlKey			= 60;
	public static final int SinaLoginUrlKey			= 61;
	public static final int SinaRegisterUrlKey 		= 62;
	public static final int QQRegisterUrlKey		= 63;
	public static final int TianyiLoginUrlKey 		= 64;
	public static final int ShareGroupInfoUrlKey	= 65;
	public static final int ExpertExInfoUrlKey		= 66;
	public static final int AddCustomExfoUrlKey		= 67;
	
	public static final String getImageBaseUrl()
	{
		if(isTest)
			return TestUrl;
		
		return ImageBaseUrl;
	}
	
	public static final String getRealUrlByKey(int urlKey)
	{
		String baseUrl = EncUrl;
		if(isTest)
			baseUrl = TestUrl;
		
		String resultUrl = "";
		switch(urlKey)
		{
			case LoginUrlKey:
				resultUrl = baseUrl + "user/login";
			break;
			case RegisterUrlKey:
				resultUrl = baseUrl+"user/regist";
			break;
			case GetVerifyUrlKey:
				resultUrl = baseUrl+"send/verifycode";
			break;
			case RepasswordUrlKey:
				resultUrl = baseUrl + "user/password/update";
			break;
			case GetMyExpertUrlKey:
				resultUrl = baseUrl + "agent/getmyAgent?mobile=%1$s";
			break;
			case GetTutorialUrlKey:
				resultUrl = baseUrl + "tutorial/title/list?pageType=%1$d&pageNumber=%2$d&pageSize=30"; //baseUrl + "group/tutorial/titlelist.txt";
			break;
			case GetTutorialDetailUrlKey:
				resultUrl = baseUrl + "tutorial/detail/%1$d?userId=%2$s"; //"group/tutorial/title%1$d.txt";
			break;
			case SearchTutorialUrlKey:
				resultUrl = baseUrl + "search/item/list?pageNumber=%1$d&pageSize=1000";
			break;
			case TutorialCollectFavour:
				resultUrl = baseUrl + "tutorial/collect?userId=%1$s&id=%2$d";
			break;
			case SuggestUrlKey:
				resultUrl = baseUrl + "feedback/submit";
			break;
			case ScoreUrlKey:
				resultUrl = baseUrl + "mark/client/submit";
			break;
			case VipScoreUrlKey:
				resultUrl = baseUrl + "mark/customerManager/submit";
			break;
			case OwerInfoUrlKey:
				resultUrl = baseUrl + "mark/customerManager/query";
			break;
			case ExpertInfoUrlKey:
				resultUrl = baseUrl + "/group/user/vip/assistant.txt";
			break;
			case OwerFriendUrlKey:
				resultUrl = baseUrl + "/group/user/detail/friendlist.txt";
			break;
			case OwerCollectUrlKey:
				resultUrl = baseUrl + "all/list";
			break;
			case OwerShareUrlKey:
				resultUrl = baseUrl + "user/share/record/list";
			break;
			case OwerMessageUrlKey:
				resultUrl = baseUrl + "message/item/list";
			break;
			case GetExpertListUrlKey:
				resultUrl = baseUrl + "agent/getAgentList?pageNumber=%1$d&mobile=%2$s";
			break;
			case GetExpertMessageUrlKey:
				resultUrl = baseUrl + "user/downloadLeaveMessage?receiverId=%1$d&senderId=%2$d";
			break;
			case OwerMessageDetailUrlKey:
				resultUrl = baseUrl + "message/item/detail";
			break;
			case OwerFriendDetailUrlKey:
				resultUrl = baseUrl + "/group/user/detail/detailfriend.txt";
			break;
			case SendMessageUrlKey:
				resultUrl = baseUrl + "user/leavemessage?senderId=%1$d&receiverId=%2$d"; //&message=%3$s
			break;
			case RandomExpertUrlKey:
				resultUrl = baseUrl + "agent/getRandomAgent?mobile=%1$s";
				break;
			case AssignExpertUrlKey:
				resultUrl = baseUrl + "agent/addAgent?mobile=%1$s&expertId=%2$s&expertMobile=%3$s";
				break;
			case OwerAddFriendLogUrlKey:
				resultUrl = baseUrl + "/group/user/detail/record.txt";
				break;
			case ManageSalaryUrlKey:
				resultUrl = baseUrl + "firstThree/salary/user";
				break;
			case ManageQeurySalaryUrlKey:
				resultUrl = baseUrl + "query/salary";
				break;
			case ManageGroupsUrlKey:
				resultUrl = baseUrl + "user/group?userId=%1$d";
				break;
			case ManageManageInfoUrlKey:
				resultUrl = baseUrl + "invited/queryFriends";
				break;
			case ManageCustomInfoUrlKey:
				resultUrl = baseUrl + "user/intfselectuser";
				break;
			case ManageAnalysisInfoUrlKey:
				resultUrl = baseUrl + "user/recommed";
				break;
			case ManageAddGroupUrlKey:
				resultUrl = baseUrl + "new/group?userId=%1$d"; // &groupName=%2$s
				break;
			case ManageRemoveGroupUrlKey:
				resultUrl = baseUrl + "delete/group?userId=%1$d&groupId=%2$d"; // &groupName=%2$s
				break;
			case ManageGetClientsUrlKey:
				resultUrl = baseUrl + "user/group/userlist?userId=%1$d&groupId=%2$s"; // &groupName=%2$s
				break;
			case ManageAddClientsToGroupUrlKey:
				resultUrl = baseUrl + "customer/group?userId=%1$d&groupId=%2$d&mobiles=%3$s"; // &groupName=%2$s
				break;
			case ManageAddCustomUrlKey:
				resultUrl = baseUrl + "invited/submitFriends";
				break;
			case ManageMoveClients:
				resultUrl = baseUrl + "customer/grouponly?userId=%1$d&groupId=%2$d&mobiles=%3$s&nowGroupId=%4$d";
			break;
			case ManageRemoveClients:
				resultUrl = baseUrl + "customer/delete?userId=%1$d&groupId=%2$d&mobiles=%3$s";
			break;
			case OwerDeleteMessageUrlKey:
				resultUrl = baseUrl + "message/item/shield";
				break;
			case OwerDeleteCollectUrlKey:
				resultUrl = baseUrl + "Dele/collectApp";
			break;
			case InviteUrlKey:
				resultUrl = baseUrl + "user/messageshare";
			break;
			case ManageQueryCustomUrl:
				resultUrl = baseUrl + "user/getDatum";
				break;
			case ManageCheckCustomUrlKey:
				resultUrl = baseUrl + "invited/friends";
				break;
			case ManageSendMessageUrlKey:
				resultUrl = baseUrl + "user/leavemessage";
				break;

			case ReinfoUrlKey:
				resultUrl = baseUrl + "user/update/submit";
			break;
			case ManageQueryContactUrlKey:
				resultUrl = baseUrl + "user/isClaimed";
			break;
			case RegisterSina:
				resultUrl = "https://api.weibo.com/oauth2/authorize?client_id=1642796414&redirect_uri=http://117.27.144.30/3g/callback/sina&response_type=code";
			break;
			case RegisterQQ:
				resultUrl = "https://open.t.qq.com/cgi-bin/oauth2/authorize?client_id=100651316&response_type=code&redirect_uri=http%3A%2F%2F117.27.144.30%2F3g%2Fcallback%2Fqq";
			break;
			case QQLoginUrlKey:
				resultUrl = baseUrl + "user/login/type/qq";
			break;
			case SinaLoginUrlKey:
				resultUrl = baseUrl + "user/login/type/sina";
			break;
			case SinaRegisterUrlKey:
				resultUrl = baseUrl + "user/regist/sina";
			break;
			case QQRegisterUrlKey:
				resultUrl = baseUrl + "user/regist/qq";
			break;
			case GetNoReadMessage:
				resultUrl = baseUrl + "user/getNoReadLeaveMessage?receiverId=%1$s";
			break;
			case OwerForgetPasswordUrl:
				resultUrl = baseUrl + "user/findpassword";
			break;
			case TianyiLoginUrlKey:
				resultUrl = baseUrl + "userphone/imsi";
				break;
			case ShareGroupInfoUrlKey:
				resultUrl = baseUrl + "group/listInfo/listgroup";
				break;
			case LiginStaticKey:
				resultUrl = baseUrl + "user/use/login";
				break;
			case ExpertExInfoUrlKey:
				resultUrl = baseUrl + "user/getUserLevel";
				break;
			case AddCustomExfoUrlKey:
				resultUrl = baseUrl + "user/singleClaim";
				break;
				
			}
		return resultUrl;
	}
	
	public static final String getUrlByKey(int urlKey)
	{
		String baseUrl = EncUrl;
		if(!isTest)
		{
			return getRealUrlByKey(urlKey);
		}
		
		//baseUrl = "http://127.0.0.1/~andersenlee/HttpJson/";
		String resultUrl = "";
		switch(urlKey)
		{
			case LoginUrlKey:
				resultUrl = baseUrl + "group/user/login.html";
			break;
			case RegisterUrlKey:
				resultUrl = baseUrl + "group/user/regist.html";
			break;
			case GetVerifyUrlKey:
				resultUrl = baseUrl + "group/user/verfifycode.html";
			break;
			case RepasswordUrlKey:
				resultUrl = baseUrl + "group/user/update.html";
			break;
			case GetMyExpertUrlKey:
				resultUrl = baseUrl + "group/user/vip/assistant.txt";
			break;
			case GetTutorialUrlKey:
				resultUrl = PrivateTestUrl + "3g/tutorial/title/list?pageType=%1$d&pageNumber=%2$d&pageSize=30"; //baseUrl + "group/tutorial/titlelist.txt";
			break;
			case GetTutorialDetailUrlKey:
				resultUrl = PrivateTestUrl + "3g/tutorial/detail/%1$d"; //"group/tutorial/title%1$d.txt";
			break;
			case TutorialCollectFavour:
				resultUrl = PrivateTestUrl + "tutorial/collect/userId=%1$s&id=%2$d";
			break;
			case SuggestUrlKey:
				resultUrl = baseUrl + "group/user/update.html";
			break;
			case ScoreUrlKey:
				resultUrl = baseUrl + "group/user/update.html";
			break;
			case VipScoreUrlKey:
				resultUrl = baseUrl + "group/user/update.html";
			break;
			case OwerInfoUrlKey:
				resultUrl = baseUrl + "/group/user/detail/person.txt";
			break;
			case ExpertInfoUrlKey:
				resultUrl = baseUrl + "/group/user/vip/assistant.txt";
			break;
			case OwerFriendUrlKey:
				resultUrl = baseUrl + "/group/user/detail/friendlist.txt";
			break;
			case OwerCollectUrlKey:
				resultUrl = baseUrl + "/group/share/mycollect.txt";
			break;
			case OwerShareUrlKey:
				resultUrl = baseUrl + "/group/share/sharerecord.txt";
			break;
			case OwerMessageUrlKey:
				resultUrl = baseUrl + "/group/message/messagelist.txt";
			break;
			case GetExpertListUrlKey:
				resultUrl = baseUrl + "/group/user/vip/talentlist.txt";
			break;
			case GetExpertMessageUrlKey:
				resultUrl = baseUrl + "/group/message/messagelist.txt";
			break;
			case OwerMessageDetailUrlKey:
				resultUrl = baseUrl + "/group/message/messageinfo.txt";
			break;
			case OwerFriendDetailUrlKey:
				resultUrl = baseUrl + "/group/user/detail/detailfriend.txt";
			break;
			case SendMessageUrlKey:
				resultUrl = baseUrl + "/group/user/vip/messagetalent.txt";
			break;
			case RandomExpertUrlKey:
				resultUrl = baseUrl + "/group/user/vip/randomtalent.txt";
				break;
			case AssignExpertUrlKey:
				resultUrl = baseUrl + "/group/user/vip/selecttalent.txt";
				break;
			case OwerAddFriendLogUrlKey:
				resultUrl = baseUrl + "/group/user/detail/record.txt";
				break;
			case ManageSalaryUrlKey:
				resultUrl = baseUrl + "/group/group/salaryandranking.txt";
				break;
			case ManageQeurySalaryUrlKey:
				resultUrl = baseUrl + "/group/group/salaryquery.txt";
				break;
			case ManageGroupsUrlKey:
				resultUrl = baseUrl + "/group/group/grouplist.txt";
				break;
			case ManageManageInfoUrlKey:
				resultUrl = baseUrl + "/group/group/customlist.txt";
				break;
			case ManageCustomInfoUrlKey:
				resultUrl = baseUrl + "/group/group/customdetail.txt";
				break;
			case ManageAnalysisInfoUrlKey:
				resultUrl = baseUrl + "/group/group/offenusedlist.txt";
				break;
			case ManageAddGroupUrlKey:
				resultUrl = baseUrl + "/group/group/newgroup.txt";
				break;
			case ManageRemoveGroupUrlKey:
				resultUrl = baseUrl + "/group/group/deletegroup.txt";
				break;
			case ManageGetClientsUrlKey:
				resultUrl = baseUrl + "/group/group/ungrouplist.txt";
				break;
			case ManageAddClientsToGroupUrlKey:
				resultUrl = baseUrl + "/group/group/setgroup.txt";
				break;
			case ManageAddCustomUrlKey:
				resultUrl = baseUrl + "/group/group/invitefriend.txt";
				break;
			case OwerDeleteMessageUrlKey:
				resultUrl = baseUrl + "/group/message/messagedelete.txt";
				break;
			case LiginStaticKey:
				resultUrl = baseUrl + "user/use/login";
				break;
			case ExpertExInfoUrlKey:
				resultUrl = baseUrl + "user/getUserLevel";
				break;
			case AddCustomExfoUrlKey:
				resultUrl = baseUrl + "user/singleClaim";
				break;
			}
		return resultUrl;
	}
}
